package com.lijinjiang.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @ClassName Demo06
 * @Description urlPattern：一个 Servlet 可以配置多个访问路径
 * @Author Li
 * @Date 2022/9/24 14:02
 * @ModifyDate 2022/9/24 14:02
 * @Version 1.0
 */
@WebServlet(urlPatterns = {"/demo06", "/demo07"})
public class Demo06 extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("Servlet Demo06 And Demo07 doGet...");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("Servlet Demo06 And Demo07 doPost...");
    }
}
